<template id="customerService">
    <div>
        <div class="customerService_top">
            <h3>售后服务</h3>
            <img src="../image/blue_da.png" alt=""  @click="getCustomerService()">
        </div>
        <div class="customerService_two">
             <div @click="is_show(1)" v-bind:class="[activeClass1]"><router-link to="/customerService/apply">申请售后</router-link></div>
             <div @click="is_show(2)" v-bind:class="[activeClass2]"><router-link to="/customerService/record">售后记录</router-link></div>
        </div>
        <router-view></router-view>
    </div>
</template>
<script>
    export default {
        name:'customerService',
		data(){
            return{
                activeClass1:'',
                activeClass2:'',
             }
        },
		mounted:function(){
			var url = this.$route.fullPath;
			if(url == '/customerService/apply'){
				this.activeClass1='is_show'
			}
			if(url == '/customerService/record'){
				this.activeClass2='is_show'
			}
        },
        methods:{
			getMyorder:function(){
			   this.$router.push('/center');
            },
            getCustomerService:function(){
                 this.$router.push('/center')
            },
			is_show(id){
				this.activeClass1='';
				this.activeClass2='';
				if(id == 1){this.activeClass1 = 'is_show';}
				if(id == 2){this.activeClass2 = 'is_show';}
			}
        }
    }
</script>
<style>
	.is_show{
		color: #2eaffc;
		border-bottom: 2px solid #2eaffc;
	}
    .customerService_two{
        width:100%;
        height:0.8rem;
        display:flex;
    }
	.customerService_two div{
        text-decoration:none;
        color:#a2a2a2;
        font-size:0.22rem;
        flex:1;
        line-height:0.8rem;
        text-align:center;
    }
    .customerService_two a{
        text-decoration:none;
        color:#a2a2a2;
        font-size:0.22rem;
        flex:1;
        line-height:0.8rem;
        text-align:center;
    }
    .customerService_top h3{
        width:100%;
        height:0.79rem;
        line-height:0.79rem;
        text-align:center;
        color:#2eaffc;
        font-size:0.28rem;
    }
    .customerService_top img{
        display:block;
        position:absolute;
        height:0.36rem;
        width:0.36rem;
        left:0.27rem;
        top:0.25rem;
    }
    .customerService_top{
        width:100%;
        height:0.79rem;
        border-bottom:1px solid #f0f0f0;
        position:relative;
    }
</style>